package com.qrback.repository;

import com.qrback.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
    
    // 根据手机号码查询用户
    Optional<User> findByPhone(String phone);
    
    // 检查手机号码是否已存在
    boolean existsByPhone(String phone);
}